FROM openeuler-22.03-lts-sp4:latest

COPY openEuler.repo /etc/yum.repos.d/openEuler.repo

RUN set -eux; \
    dnf install -y openssl fontconfig glibc-all-langpacks && dnf clean all

ARG JAVA_VERSION=17.0.15-b12

RUN set -eux; \
    mkdir /opt/bishengjdk && \
    curl -o bishengjdk.tar.gz https://mirrors.huaweicloud.com/kunpeng/archive/compiler/bisheng_jdk/bisheng-jdk-${JAVA_VERSION}-linux-aarch64.tar.gz && \
    tar -zxf bishengjdk.tar.gz -C /opt/bishengjdk --strip-components=1 && \
    rm -rf bishengjdk.tar.gz

ENV JAVA_HOME /opt/bishengjdk 
ENV PATH $JAVA_HOME/bin:$PATH
ENV LD_LIBRARY_PATH $JAVA_HOME/lib:$LD_LIBRARY_PATH

ENV LANG en_US.UTF-8

CMD ["jshell"]
